package com.itmayiedu.api.service.impl;

import com.itmayiedu.base.BaseApiService;
import com.itmayiedu.base.ResponseBase;
import entity.UserEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 会员接口实现类
 * @author: liucancan
 * @create: 2018-11-12 14:23
 **/
@RestController
public class MemberServiceImpl extends BaseApiService implements IMemberService {

    @RequestMapping("/getMember")
    public UserEntity getMember() {
        UserEntity userEntity = new UserEntity();
        userEntity.setAge(1);
        userEntity.setName("hh");
        return userEntity;
    }

    @RequestMapping("/getUserInfo")
    public ResponseBase getUserInfo() {
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return setResultSuccess("订单服务调用会员服务中的用户信息");
    }
}
